<script>
import {allNotice} from "@/api/request";

export default {
  name: "ShowNotice",
  data() {
    return {
      tableData: [{
        noticeId: 1,
        noticeTitle: '',
      }]
    }
  },
  methods: {
    getNotice() {
      allNotice().then(
          res => {
            if (res.data.code === 1) {
              this.tableData = res.data.data
            }
          }
      )
    }
  },
  mounted() {
    this.getNotice()
  }
}
</script>

<template>
  <el-container>
    <el-main>
      <el-row>
        <el-col>
          <el-table
              :data="tableData"
              style="width: 100%">
            <el-table-column
                prop="noticeId"
                label="公告编号"
                width="200">
            </el-table-column>
            <el-table-column
                prop="noticeTitle"
                label="公告名称">
            </el-table-column>
          </el-table>
        </el-col>
      </el-row>

    </el-main>
  </el-container>
</template>

<style scoped>
::v-deep .el-table__row {
  background-color: #f9f4e9 !important;
}
::v-deep .el-table th.el-table__cell{
  background-color: #f9f4e9 !important;
}
</style>
